﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BGCMS.Models.AdministratorsViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Umsjónarmenn síðu
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="leftside">
        <% Html.RenderPartial("AdminLinks"); %>
    </div>
    <div id="content">
        <h2>
            Umsjónarmenn síðu</h2>
        <div>
            <h3>
                Virkir umsjónarmenn</h3>
            <table class="tafla">
                <thead>
                    <tr>
                        <th>
                            Nafn
                        </th>
                        <th>
                            Titill
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <% foreach (var a in Model.Admins)
                       { %>
                    <tr>
                        <td>
                            <%: Html.ActionLink( a.Name, "SpecialistDetails", "Specialist", new { id = a.UserID }, null) %>
                        </td>
                        <td>
                            <%: a.Title %>
                        </td>
                        <td>
                            <%: Html.ActionLink( "Fjarlægja úr hóp", "RemoveAdmin", new { id = a.UserID }) %>
                        </td>
                    </tr>
                    <% } %>
                </tbody>
            </table>
        </div>
        <div>
            <h3>
                Aðrir sérfræðingar</h3>
            <table class="tafla">
                <thead>
                    <tr>
                        <th>
                            Nafn
                        </th>
                        <th>
                            Titill
                        </th>
                        <th>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <% foreach (var a in Model.Others)
                       { %>
                    <tr>
                        <td>
                            <%: Html.ActionLink( a.Name, "SpecialistDetails", "Specialist", new { id = a.UserID }, null) %>
                        </td>
                        <td>
                            <%: a.Title %>
                        </td>
                        <td>
                            <%: Html.ActionLink( "Gera að umsjónarmanni", "MakeAdmin", new { id = a.UserID }) %>
                        </td>
                    </tr>
                    <% } %>
                </tbody>
            </table>
        </div>
    </div>
</asp:Content>